<template>
	<view class="content">

		<view v-if="content && id == 234">
			<view class="fwb1" v-if="content">
				<u-parse :content="content" :imageProp='imageProp' @preview="preview" @navigate="navigate"
					className="html_content" />
			</view>
			<view class="jqqd" v-else>
				<image src="@/static/activity/healthHome/jqqd.png" alt="" />
				</image>
				<view>敬请期待</view>
			</view>
		</view>

		<view v-if="content && id == 236">
			<view class="fwb2" v-if="content">
				<u-parse :content="content" :imageProp='imageProp' @preview="preview" @navigate="navigate"
					className="html_content" />
			</view>
			<view class="jqqd" v-else>
				<image src="@/static/activity/healthHome/jqqd.png" alt="" />
				</image>
				<view>敬请期待</view>
			</view>
		</view>

		<view v-if="content && id == 238">
			<view class="fwb3" v-if="content">
				<u-parse :content="content" :imageProp='imageProp' @preview="preview" @navigate="navigate"
					className="html_content" />
			</view>
			<view class="jqqd" v-else>
				<image src="@/static/activity/healthHome/jqqd.png" alt="" />
				</image>
				<view>敬请期待</view>
			</view>
		</view>

		<view v-if="video_url">
			<view class="kuang" v-if="video_url">
				<view class="shipin">
					<video :src="video_url"></video>
				</view>
				<view class="title" style="margin-top: 30rpx;">演唱曲目: {{title}}</view>
				<view class="title">歌手: {{author}}</view>
			</view>
			<view class="jqqd" v-else>
				<image src="@/static/activity/healthHome/jqqd.png" alt="" />
				</image>
				<view>敬请期待</view>
			</view>
		</view>

	</view>
</template>
<script>
	import uParse from '@/components/gaoyia-parse/parse.vue'
	export default {
		components: {
			uParse
		},
		data() {
			return {
				content: null,
				imageProp: {
					mode: 'widthFix',
					padding: 0,
					lazyLoad: false,
					window: '100%'
				},
				video_url: null,
				author: null,
				title: null,
			}
		},
		onLoad(opt) {
			this.id = opt.id
			this.content = opt.content
			console.log('content: ', this.content);
			this.video_url = opt.video_url
			this.author = opt.author
			this.title = opt.title
			console.log('video: ', this.video_url);
		},
		methods: {
			show_loading() {
				uni.showLoading({
					title: '请稍候...'
				});
			},
			hide_loading() {
				uni.hideLoading();
			},
			preview(src, e) {
				// do something
			},
			navigate(href, e) {
				// do something
			}
		}
	}
</script>

<style>
	@import url("/components/gaoyia-parse/parse.css");

	.content {
		width: 100vw;
		height: 100vh;
		background: url('../../../static/activity/centuryLaborUnion/indexBj.jpg') 100% 100% / 100% 100%;
	}

	.fwb2 {
		margin-top: 220rpx;
	}

	.fwb3 {
		margin-top: 420rpx;
	}

	.kuang {
		width: 88%;
		margin: 0 auto;
		margin-top: 420rpx;
		background-color: white;
		border-radius: 15rpx;
		padding-bottom: 5rpx;
	}

	.shipin {
		width: 95%;
		margin: 0 auto;
		height: 350rpx;
		padding-top: 20rpx;
	}

	.shipin>video {
		width: 100%;
		height: 100%;
		border-radius: 15rpx;
	}

	.title {
		text-align: center;
		margin: 20rpx 0;
	}

	.jqqd {
		width: 500rpx;
		height: 500rpx;
		margin: 0 auto;
		color: #fff;
		font-size: 35rpx;
		text-align: center;
	}

	.jqqd>image {
		width: 100%;
		height: 100%;
	}
</style>